/*
 * Atualizado por Davi Uezono em 12.10.2011 às 02h11min.
 */
package Objects;

public class Feature implements CRUDClass {

  private int featureID, color;
  private String description;
  
  public Feature(int featureID, int color, String description) {
    this.featureID = featureID;
    this.color = color;
    this.description = description;
  }

    public int getFeatureID() {
        return featureID;
    }

    public void setFeatureID(int featureID) {
        this.featureID = featureID;
    }

    public int getColor() {
        return color;
    }

    public void setColor(int color) {
        this.color = color;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

  


  @Override
  public String toInsert() {
    return "INSERT INTO Feature VALUES (" + this.featureID + ", " + this.color + ", '" + this.description + "');";
  }

  @Override
  public String toUpdate() {
    //return "UPDATE Color SET Description = '" + this.description + "' WHERE colorID = " + this.colorID;
    return "UPDATE Feature SET Description = '" + this.description + "' AND Color = " + this.color + " WHERE FeatureID = '" + this.featureID + ");";
  }

  @Override
  public String toDelete() {
    return "DELETE FROM Feature WHERE FeatureID = " + this.featureID;
  }
}
